{extend name="$LAYOUT_MOBILE_BASE" /}
{block name="title"}关联账号 - {__block__}{/block}
{block name="css"}
<link href="__ROOT__/addons/thirdlogin/view/mobile/index/user.css?v={$v}" rel="stylesheet">
{/block}
{block name="header"}
       <header style="background:#ffffff;" class="ui-header ui-header-positive wst-header">
       	   <i id="return" class="ui-icon-return" onclick="javascript:inReturn();" style="display:none;"></i><h1 id="login-w">关联账号</h1>
       </header>
{/block}
{block name="footer"}
		{/* 大加载 */}
		<div class="ui-loading-block" id="Loadl">
		    <div class="ui-loading-cnt">
		        <i class="ui-loading-bright"></i>
		        <p id="j-Loadl">正在加载中...</p>
		    </div>
		</div>
{/block}
{block name="main"}
	  <input type="hidden" value="{:WSTConf('CONF.pwdModulusKey')}" id="key" autocomplete="off">
      <section class="ui-container" id="choice">
      	 <div class="wst-lo-choice">
      	 	<div class="img"><img src="{$info['userPhoto']}"></div>
      	 	<p class="name">{$info['userName']}</p>
      	 	<p class="prompt">您尚未关联{:WSTConf('CONF.mallName')}账号</p>
      	 	<div class="choice">
      	 		<button class="button0" type="button" onclick='javascript:inChoice(0);'>关联新账号</button>
			</div> 
      	 	<div class="choice">
      	 		<button class="button1" type="button" onclick='javascript:inChoice(1);'>关联到已有账号</button>
      	 	</div> 	 		
      	 </div>
      </section>
      <section class="ui-container" id="login1" style="display:none;">
      	 <div class="wst-lo-frame">
			<div class="frame"><input id="loginName" type="text" placeholder="邮箱/用户名/手机号"></div>
			<div class="frame"><input id="loginPwd" type="password" placeholder="密码"></div>
			<div class="verify">
				<input id="loginVerfy" type="text" placeholder="输入验证码" maxlength="10">
				<img id='verifyImg1' src="{:url('mobile/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg1")'>
			</div>
    	</div>
    	<div class="wst-lo-button">
			<button id="loginButton" class="button" onclick="javascript:login();">绑定</button>
		</div>
      </section>
      <section class="ui-container" id="login0" style="display:none;">
      	 <div class="wst-lo-frame">
			<div class="frame"><input id="regName" type="text" placeholder="手机号"></div>
			<div class="frame"><input id="regPwd" type="password" placeholder="密码"></div>
			<div class="frame"><input id="regcoPwd" type="password" placeholder="确认密码"></div>
			
			{/* 获取验证码的验证prompt */}
			{if(WSTConf('CONF.smsVerfy')==1)}
			<div class="verify phone">
				<input id="smsVerfy" type="text" placeholder="输入短信验证码" maxlength="10">
				<img id='verifyImg3' src="{:url('mobile/users/getVerify')}" onclick='javascript:WST.getVerify("#verifyImg3")'>
			</div>
			{/if}
			{/* 获取验证码 prompt */}
			<div class="verify phone">
				<input id="phoneCode" type="text" placeholder="输入短信验证码" maxlength="8">
				<button id="obtain" class="ui-btn ui-btn-primary" onclick="javascript:obtainCode()">获取验证码</button>
			</div>
    	</div>
    	<div class="wst-lo-button">
			<button id="regButton" class="button" onclick="javascript:register();">注册</button>
		</div>
      </section>
{/block}
{block name="js"}
<script type="text/javascript" src="__STATIC__/js/rsa.js"></script>
<script type='text/javascript' src='__ROOT__/addons/thirdlogin/view/mobile/index/login.js?v={$v}'></script>
{/block}